@import './variable.scss';

html {
  box-sizing: border-box;
  font-size: 16px;
}
body {
  overflow: hidden;
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

:root {
  --theme-color: #08a1a3;
  --danger-color: #f56c6c;
}

%scrollbar {
  &::-webkit-scrollbar {
    width: 4px;
    height: 4px;
    border-radius: 10px;
    background-color: #f9f9f9;
  }

  &::-webkit-scrollbar-thumb {
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
    //background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0.44,rgb(60,186,146)),color-stop(0.72,rgb(253,187,45)),color-stop(0.86,rgb(253,187,45)));
    background-color: rgba(144, 147, 153, 0.1);
    transition: 0.3s ease-in-out;
  }

  &::-webkit-scrollbar-track {
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    background-color: #f9f9f9;
  }
}

.scrollbar {
  width: 100%;
  height: 100%;

  .scrollbar-wrapper {
    overflow-x: hidden;
  }
}

.flex {
  display: flex;
}
.flex-shrink-0 {
  flex-shrink: 0;
}
.flex-1 {
  flex: 1;
}

.inline-flex {
  display: inline-flex;
}

.display-block {
  display: block !important;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.direction-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.justify-evenly {
  justify-content: space-evenly;
}

.justify-center {
  justify-content: center;
}

.align-center {
  align-items: center;
}

.text-decoration-none {
  text-decoration: none;
}

.margin {
  margin: $gutter;
}

.margin-left-auto {
  margin-left: auto;
}

.padding {
  padding: $gutter;
}

.padding-vertical {
  padding-top: $gutter;
  padding-bottom: $gutter;
}

.padding-horizontal {
  padding-left: $gutter;
  padding-right: $gutter;
}

.margin-vertical {
  margin-top: $gutter;
  margin-bottom: $gutter;
}

.margin-horizontal {
  margin-left: $gutter;
  margin-right: $gutter;
}

.color-inherit {
  color: inherit;
}

.width-100 {
  width: 100%;

  &.el-date-editor.el-input,
  &.el-date-editor.el-input__inner {
    width: 100%;
  }
}

.width-50 {
  width: 50%;
}
.width-33 {
  width: 33.33%;
}

.height-100 {
  height: 100%;
}

.bg-white {
  background: white;
}

.text-gray {
  color: gray;
}

$directions: top right bottom left;
@each $direction in $directions {
  .margin-#{$direction} {
    margin-#{$direction}: $gutter;
  }
  .padding-#{$direction} {
    padding-#{$direction}: $gutter;
  }
  .margin-#{$direction}-10 {
    margin-#{$direction}: 10px;
  }
  .padding-#{$direction}-10 {
    padding-#{$direction}: 10px;
  }
  .margin-#{$direction}-5 {
    margin-#{$direction}: 5px;
  }
  .margin-#{$direction}-0 {
    margin-#{$direction}: 0;
  }
  .padding-#{$direction}-5 {
    padding-#{$direction}: 5px;
  }
  .padding-#{$direction}-0 {
    padding-#{$direction}: 0;
  }
}

$sizes: 0 10 15 20;
@each $size in $sizes {
  .margin-#{$size} {
    margin: #{$size}px;
  }
  .padding-#{$size} {
    padding: #{$size}px;
  }

  .margin-top-#{$size} {
    margin-top: #{$size}px;
  }
  .margin-bottom-#{$size} {
    margin-bottom: #{$size}px;
  }
  .margin-left-#{$size} {
    margin-left: #{$size}px;
  }
  .margin-right-#{$size} {
    margin-right: #{$size}px;
  }

  .margin-vertical-#{$size} {
    margin-top: #{$size}px;
    margin-bottom: #{$size}px;
  }
  .margin-horizontal-#{$size} {
    margin-left: #{$size}px;
    margin-right: #{$size}px;
  }
  .padding-vertical-#{$size} {
    padding-top: #{$size}px;
    padding-bottom: #{$size}px;
  }
  .padding-horizontal-#{$size} {
    padding-left: #{$size}px;
    padding-right: #{$size}px;
  }
}
.margin-horizontal-auto {
  margin-left: auto;
  margin-right: auto;
}

$font-sizes: (normal, 14px), (large, 16px), (xlarge, 18px), (small, 12px),
  (xsmall, 10px);
@each $font, $size in $font-sizes {
  .font-#{$font} {
    font-size: $size;
  }
}

.button-group {
  text-align: left;
  margin-bottom: $gutter;
}

.search-form.bottom-0 {
  .el-form-item {
    margin-bottom: 0;
  }
}

.info-title {
  line-height: 1;
  font-weight: 600;
  box-sizing: border-box;
  padding: 20px $gutter 10px;
}
.info-head {
  padding: 20px $gutter 0 $gutter;
  font-size: 16px;
}
.border-box {
  box-sizing: border-box;
}

.border-radius {
  border-radius: 4px;
}

.amap-logo {
  opacity: 0;
}

$left-tree-width: 300px;
.content-with-tree {
  .left-tree {
    width: $left-tree-width;
    height: 100%;
    background: white;
    flex-shrink: 0;
    border-radius: 0.3em;
    margin-right: $gutter;
  }

  .right-content {
    flex: 1;
    width: calc(100% - $gutter - $left-tree-width);
  }

  @media screen and (max-width: 1600px) {
    .left-tree {
      width: $left-tree-width / 1.3;
    }
  }
  @media screen and (max-width: 1330px) {
    .left-tree {
      width: $left-tree-width / 1.5;
    }
  }
}

.pagination {
  margin-top: $gutter;
  text-align: right;
}

.table.el-table:before {
  display: none;
}

.column-image {
  width: 40px;
  height: 40px;
}

.empty-lists {
  padding: 10em 5em;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #dbdbdb;
  &.padding {
    padding: $gutter !important;
  }
  .svg-icon {
    font-size: 40px;
  }

  .empty-text {
    line-height: 40px;
  }
}

.form-box {
  &:after {
    content: '';
    display: table;
    clear: both;
  }
}

.form-box .el-form-item {
  @media screen and (min-width: 1400px) {
    float: left;
    width: 50%;
  }

  &:last-child {
    margin-bottom: 0;
  }
}

.text-center {
  text-align: center;
}

.is-collapsed {
  .layout-menu .menu-icon {
    font-size: 1.5em !important;
  }
}

.box-shadow {
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.2);
}

.overflow-auto {
  overflow: auto;
}

.overflow-hidden {
  overflow: hidden;
}

.position-relative {
  position: relative;
}

.overview-item {
  .item-icon {
    display: none;
  }
}

.fixed-page {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1111;
  //background: radial-gradient(#1a56c3, #0c1b58);
  background: #0c1b58;
  padding: 1rem;
  overflow: auto;

  .back-button {
    font-size: 1.2rem;
    margin: 1rem 0.4rem 1rem 0;
  }
}

.visual-page {
  color: var(--theme-color-light);

  .el-input__inner {
    background: transparent;
    color: inherit;
    border-color: var(--theme-color-light);
  }

  .el-range-input {
    background: transparent;
  }

  .el-form-item__label {
    color: inherit;
  }
}

.tooltip-table {
  border: 1px solid;
  width: 100%;

  td {
    border: 1px solid;
    font-size: 11px;
    padding: 3px 6px;
  }
}

.overlay-page {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 999;
  background: #eee;
}

.popper-marker {
  background: white;
  border-radius: 0.3em;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
  position: relative;
  $border-width: 12px;

  &::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: $border-width solid white;
    border-left: $border-width solid transparent;
    border-right: $border-width solid transparent;
    position: absolute;
    margin-top: -1px;
    margin-left: -$border-width;
    top: 100%;
    left: 50%;
  }

  &::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger-color);
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    margin-top: $border-width;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
  }
}

.list-unstyle {
  list-style: none;
  padding-left: 0;
}

.link {
  text-decoration: none;
  color: inherit;
}

.flex-layout {
  width: 100vw;
  height: 100vh;
  $aside-width: 240px;
  $head-height: 60px;

  &-head,
  &-body {
    display: flex;
  }

  &-head {
    height: $head-height;
  }

  &-body {
    height: calc(100% - $head-height);
  }

  &-top,
  &-main {
    flex: 1;
  }

  &-aside,
  &-logo {
    flex: 0 0 $aside-width;
  }
}

input[type='number'] {
  -moz-appearance: textfield;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.el-upload-list__item-name,
.el-upload-list__item {
  transition: none !important;
}
.visual-layout {
  $color-1: #0c4092;
  $color-2: #4b84e0;
  $color-3: #aac4ee;
  $item-background: rgba(0, 0, 0, 0.25);

  width: 100%;
  height: 100%;
  padding: 0 $gutter $gutter $gutter;

  color: $color-2;
  background-color: #011933;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;

  &:not(.not-grid) {
    display: grid;
    grid-gap: $gutter;
  }
  &:not(.no-background-image) {
    background-image: url('../screen-bg.png');
  }
  &.no-background-image {
    background-image: none;
  }

  .factory .link,
  .grid-item,
  .border-radius {
    border-radius: 12px !important;
  }

  .visual-menu-button {
    margin-left: $gutter;
    z-index: 9999;
  }
  .title-img {
    height: 30px;
    width: auto;
    margin-left: $gutter;
  }
  .visual-layout-head {
    background-color: transparent !important;
    padding: 0 !important;
    &:after {
      content: '';
      display: block;
      width: 100vw;
      height: 4.5vw;
      position: absolute;
      left: 0;
      right: 0;
      top: 25%;
      background-image: url('@/assets/title-line.png');
      background-repeat: no-repeat;
      background-position: left top;
      background-size: 100% auto;
    }
  }
  .grid-item {
    border-radius: 4px;
    padding: $gutter;
    background: $item-background;
    .text {
      font-size: 1rem;
    }
    .value {
      font-size: 1.1rem;
      color: $color-3;
    }
  }
  .factories-wrap {
    display: flex;
    flex-wrap: wrap;
    margin: -$gutter / 2;
  }
  .factory {
    flex: 0 0 100%;
    padding: $gutter / 2;
    overflow: hidden;
    .link {
      border-radius: 4px;
      display: block;
      background: $item-background;
      padding: 1.5rem 1rem;
      font-size: 1.2rem;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
    dl {
      margin: 0;
      padding: 0;
    }
    dd {
      margin-left: 0;
      margin-top: 10px;
      font-size: 14px;
      color: $color-3;
    }
  }
}
.mini-size {
  font-size: 0.8rem !important;
}
.small-size {
  font-size: 0.9rem !important;
}
.large-size {
  font-size: 1.6rem !important;
}
.extra-large-size {
  font-size: 2rem !important;
}
$font-sizes: 0.8 0.9 1 1.1 1.2 1.3 1.4 1.6 1.8 1.5 2.4 2.6 3 3.2;
@each $size in $font-sizes {
  $index: index($font-sizes, $size);
  .font-#{$index} {
    font-size: #{$size}rem !important;
  }
}

.focus-color {
  color: orangered;
}

.vertical-align-middle {
  vertical-align: middle;
}

.energy-data-xxx {
  &.grid {
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 2fr 1fr;
    grid-gap: $gutter;
  }
  .grid-item {
    border-radius: 4px;
    background: white;
    padding: $gutter;
  }
  .grid-item-0 {
    grid-column-start: 1;
    grid-column-end: 3;
  }
  .sub-grid {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: 60px 1fr;
    grid-gap: $gutter;
  }
}

.industry-data-xxx {
  .lines-area {
    flex: 1 0 67%;
  }
  .pie-area {
    flex: 0 0 33%;
  }
}
.gray-page {
  background: #f6f6f6;
}
.el-menu--popup {
  .menu-title {
    color: #333333 !important;
  }
  .el-menu-item {
    background: #ffffff !important;
    &:hover,
    &.is-active {
      .menu-title {
        color: var(--theme-color) !important;
      }
    }
  }
}

#nprogress .bar {
  background: var(--theme-color) !important;
}
#nprogress .spinner-icon {
  border-top-color: var(--theme-color) !important;
  border-left-color: var(--theme-color) !important;
}

.geo3d-tooltip {
  background: #0c4071;
  color: #fff;
  padding: 10px 15px;
}
.global-filter-popper {
  .el-popover__title {
    font-weight: 700;
    padding: 1rem 0;
  }
  .el-checkbox {
    line-height: 2;
  }
  h3 {
    font-size: 14px;
  }
}
.white-space-nowrap {
  &.el-table {
    .cell {
      white-space: nowrap;
      overflow: visible;
    }
  }
  .table-first-column .cell {
    display: flex;
    align-items: center;
    .el-link {
      justify-content: flex-start;
    }
  }
}
.text-truncate {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.gap {
  gap: 1rem;
}
@import './report-table.css';

.wrap-unit-in-thead-name,
.wrap-unit-in-thead-unit {
  text-align: center;
}

.text-truncate {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.chart-internal-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  margin: 10px auto;
  th,td {
    padding: 4px;
    border: 1px solid #DCDFE6;
    user-select: text;
  }
}